/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.eleric.rememome.db;

import com.eleric.rememome.memo.Memo;
import com.eleric.rememome.memo.MemoCategory;
import com.eleric.rememome.type.OrderType;
import java.util.Date;
import java.util.List;

/**
 *
 * @author MWaldman
 */
public interface MemoDbAdaptor extends DbAdaptor
{

    public int getVersion();

    public int getPreviousVersion();

    public String getDatabaseName();

    public String getMemoTableName();

    public String getMemoCategoryTableName();

    public long insertMemo(Memo memo);

    public long insertMemo(String memo, int category, int status, Date creationTimestamp,
            Date statusTimestamp, int priority);

    public boolean updateMemo(Memo memo);

    public boolean updateMemo(long rowId, String memo, int category, int status,
            Date creationTimestamp, Date statusTimestamp, int priority);

    public boolean deleteMemo(long rowId);

    public boolean deleteMemo(String memo);

    public List<Memo> listMemos();

    public List<Memo> listMemos(OrderType orderType);

    public List<Memo> listMemos(OrderType orderType, MemoCategory cat);

    public Memo getMemo(long rowId);

    public long insertCategory(MemoCategory mc);

    public long insertCategory(String shortName, String longName);

    public boolean deleteCategory(MemoCategory mc);

    public boolean deleteCategory(long rowId);

    public MemoCategory getCategory(long rowId);

    public MemoCategory getCategory(String categoryName);

    public List<MemoCategory> listCategories();
}
